<!DOCTYPE html>
<html lang="cn" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>05指令v-on</title>
</head>
<body>
    <div id="app">
        <!-- 在此click是事件名 -->
        <button v-on:click="money">点我有惊喜</button>&nbsp;
        <button @click="love">再点更惊喜</button>
    </div>
    <script type="module">
        /*引入vue模块*/
        import {createApp} from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js'
        //创建vue应用实例
        createApp({
            data(){
                return{
                    
                }
            },
            methods:{
                money:function(){
                    alert('给我钱100')
                },
                love:function(){
                    alert('玩战雷完的')
                }
            }
        }).mount('#app') //控制html元素
    </script>
</body>
</html>